function res = CalcPped( pnumsInit, lsteps, rsteps )

    Wp = load('workParams.mat');

    pStr2Double_ = defParamSet(Wp.pdm);
  
    %pname = cell2mat(k(pnums(1)));
    
    k = keys(Wp.pdm);
    
    res = cp(pStr2Double_, pnumsInit);

    function r = cp(pStr2Double, pnums)    
        curColNum = pnums(1);
        pname = cell2mat(k(curColNum));
        pinfo = Wp.pdm(pname);
        lb = pinfo(2);
        rb = pinfo(3);
        defVal = pinfo(1);    
    
        %pvc = vertcat(pValsChanged, pname);
        r = [];
                
        [ls,rs] = GetOptShift(curColNum);
        leftVal = defVal - ls;
        rightVal = defVal + rs;
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        pStr2Double(pname) = leftVal;
        plg = isParamsGood(Wp.pf, pStr2Double);
        if length(pnums) == 1
            subresl = [];
            for j = 1:length(pnumsInit) 
                pn = cell2mat(k(pnumsInit(j)));
                subresl = vertcat(subres, {pn pStr2Double(pn)});
            end
        end

        pStr2Double(pname) = rightVal;
        prg = isParamsGood(Wp.pf, pStr2Double);
        if length(pnums) == 1
            subresr = [];
            for j = 1:length(pnumsInit) 
                pn = cell2mat(k(pnumsInit(j)));
                subresr = vertcat(subres, {pn pStr2Double(pn)});
            end
        end
        
        %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
        if length(pnums) == 1
            goodness = [sum(plg) sum(prg)];
            sbr = {{subresl, subresr}, goodness};
            r = vertcat(r,sbr);
            
            disp(subres);
            disp(goodness);
            fprintf('\n');                        
        else
            pStr2Double(pname) = leftVal;
            r = vertcat(r, cp(pStr2Double, pnums(2:length(pnums))) );

            pStr2Double(pname) = rightVal;
            r = vertcat(r, cp(pStr2Double, pnums(2:length(pnums))) );
        end        
    end
end

